home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / GAME / RoboWar 4.1.1.sit / RoboWar 4.1.1 / Tournament VII / Team / Team - WonderDog < prev    next >
Text File  |  1994-01-03  |  7KB  |  383 lines

  1. #Team - WonderDog
  2. #written by Paul Schmidt
  3. #revised on January 3, 1994
  4. #e-mail:  schmidtp@carleton.edu
  5. #snail mail:Paul Schmidt
  6. #           Carleton College
  7. #           Northfield, MN 55057
  8.  
  9. {WonderDog has been constructed with a great deal of effort over a rather lengthy period of time.  For long stretches the code would not be touched, but then an idea would be sparked and changes made.  In the future I'm confident that I'll be able to write better code.  Right now, however, I think that WonderDog is a pretty good indication of my abilities in RoboWar.  Feel free to use some of it for inspiration if it has an idea that you like.  However, I would also like to discourage you from copying complete sections of code.}
  10.  
  11. start:
  12.  100 shield' store
  13.  y 100 < upStart ifg
  14.  y 200 > downStart ifg
  15.  x 150 > rightStart ifg
  16.  
  17. ##############################################
  18. ################  left wall  #################
  19. ##############################################
  20.  
  21. leftStart:
  22.  icon3
  23.  shoot range' setint
  24.  kill collision' setint
  25.  fastLeftStopX left' setint
  26.  leftDirectionChange top' setint
  27.  leftDirectionChange bot' setint
  28.  inton
  29.  y 20 < getUp if
  30.  y 280 > getDown if
  31.  x 22 < stickLeft ifg
  32.  -10 speedx' store
  33. leftCheck:
  34.  90 aim' store
  35.  270 aim' store
  36.  240 aim' store
  37.  300 aim' store
  38.  speedx leftCheck ifg
  39. leftSweep:
  40.  icon3
  41.  15 top' setparam
  42.  5 speedy' store
  43.  0 speedx' store
  44.  10 x - movex' store
  45.  DownSweep bot' setint
  46.  inton
  47. leftMain:
  48.  90 aim' store
  49.  energy 130 > randomShot if
  50.  30 aim' store
  51.  120 aim' store
  52.  0 aim' store
  53.  range doppler not and blast if
  54.  60 aim' store
  55.  150 aim' store
  56.  45 aim' store
  57.  180 aim' store
  58.  range doppler not and blast if
  59.  135 aim' store
  60.  15 aim' store
  61.  0 aim' store
  62.  range doppler not and blast if
  63.  105 aim' store
  64.  75 aim' store
  65.  165 aim' store
  66.  180 aim' store
  67.  range doppler not and blast if
  68. leftmain jump
  69.  
  70. stickLeft:
  71.  10 x - movex' store
  72. leftSweep jump
  73.  
  74. fastLeftStopx:
  75.  0 speedx' store
  76.  10 x - movex' store
  77.  -1 left' setparam
  78. rti
  79.  
  80. LeftDirectionChange:
  81.  speedy chs speedy' store
  82.  90 aim' store
  83. rti
  84.  
  85. ##############################################
  86. ###############  bottom wall  ################
  87. ##############################################
  88.  
  89. downStart:
  90.  shoot range' setint
  91.  kill collision' setint
  92.  fastDownStopY bot' setint
  93.  downDirectionChange left' setint
  94.  downDirectionChange right' setint
  95.  inton
  96.  x 20 < getLeft if
  97.  x 280 > getRight if
  98.  y 278 > stickDown ifg
  99.  10 speedy' store
  100. downCheck:
  101.  0 aim' store
  102.  180 aim' store
  103.  150 aim' store
  104.  210 aim' store
  105.  speedy downCheck ifg
  106. downSweep:
  107.  icon0
  108.  15 left' setparam
  109.  0 speedy' store
  110.  5 speedx' store
  111.  290 y - movey' store
  112.  rightSweep right' setint
  113.  inton
  114. downMain:
  115.  0 aim' store
  116.  energy 130 > randomShot if
  117.  300 aim' store
  118.  270 aim' store
  119.  range doppler not and blast if
  120.  30 aim' store
  121.  330 aim' store
  122.  60 aim' store
  123.  90 aim' store
  124.  range doppler not and blast if
  125.  15 aim' store
  126.  105 aim' store
  127.  315 aim' store
  128.  270 aim' store
  129.  range doppler not and blast if
  130.  75 aim' store
  131.  285 aim' store
  132.  45 aim' store
  133.  90 aim' store
  134.  range doppler not and blast if
  135. downMain jump
  136.  
  137. DownDirectionChange:
  138.  speedx chs speedx' store
  139.  0 aim' store
  140. rti
  141.  
  142. stickDown:
  143.  290 y - movey' store
  144. downSweep jump
  145.  
  146. fastDownStopy:
  147.  0 speedy' store
  148.  290 y - movey' store
  149.  -1 bot' setparam
  150. rti
  151.  
  152. ##############################################
  153. ################  right wall  ################
  154. ##############################################
  155.  
  156. rightStart:
  157.  icon4
  158.  shoot range' setint
  159.  kill collision' setint
  160.  fastRightStopX right' setint
  161.  rightDirectionChange top' setint
  162.  rightDirectionChange bot' setint
  163.  inton
  164.  y 20 < getUp if
  165.  y 280 > getDown if
  166.  x 278 > stickRight ifg
  167.  10 speedx' store
  168. rightCheck:
  169.  90 aim' store
  170.  270 aim' store
  171.  60 aim' store
  172.  120 aim' store
  173.  speedx rightCheck ifg
  174. rightSweep:
  175.  icon4
  176.  285 bot' setparam
  177.  -5 speedy' store
  178.  0 speedx' store
  179.  290 x - movex' store
  180.  UpSweep top' setint
  181.  inton
  182. rightMain:
  183.  270 aim' store
  184.  energy 130 > randomShot if
  185.  210 aim' store
  186.  300 aim' store
  187.  0 aim' store
  188.  range doppler not and blast if
  189.  240 aim' store
  190.  330 aim' store
  191.  180 aim' store
  192.  range doppler not and blast if
  193.  195 aim' store
  194.  345 aim' store
  195.  225 aim' store
  196.  0 aim' store
  197.  range doppler not and blast if
  198.  315 aim' store
  199.  255 aim' store
  200.  165 aim' store
  201.  180 aim' store
  202.  range doppler not and blast if
  203. rightMain jump
  204.  
  205. RightDirectionChange:
  206.  speedy chs speedy' store
  207.  270 aim' store
  208. rti
  209.  
  210. stickRight:
  211.  290 x - movex' store
  212. rightSweep jump
  213.  
  214. fastRightStopx:
  215.  0 speedx' store
  216.  290 x - movex' store
  217.  -1 right' setparam
  218. rti
  219.  
  220. ##############################################
  221. #################  top wall  #################
  222. ##############################################
  223.  
  224. upStart:
  225.  icon2
  226.  shoot range' setint
  227.  kill collision' setint
  228.  fastUpStopY top' setint
  229.  upDirectionChange right' setint
  230.  upDirectionChange left' setint
  231.  inton
  232.  x 20 < getRight if
  233.  x 280 > getLeft if
  234.  y 22 < stickUp ifg
  235.  -10 speedy' store
  236. upCheck:
  237.  0 aim' store
  238.  180 aim' store
  239.  30 aim' store
  240.  330 aim' store
  241.  speedy upCheck ifg
  242. upSweep:
  243.  icon2
  244.  285 right' setparam
  245.  -5 speedx' store
  246.  0 speedy' store
  247.  10 y - movey' store
  248.  LeftSweep left' setint
  249.  inton
  250. upMain:
  251.  180 aim' store
  252.  energy 130 > randomShot if
  253.  120 aim' store
  254.  210 aim' store
  255.  270 aim' store
  256.  range doppler not and blast if
  257.  150 aim' store
  258.  240 aim' store
  259.  90 aim' store
  260.  range doppler not and blast if
  261.  105 aim' store
  262.  165 aim' store
  263.  255 aim' store
  264.  270 aim' store
  265.  range doppler not and blast if
  266.  285 aim' store
  267.  225 aim' store
  268.  135 aim' store
  269.  90 aim' store
  270.  range doppler not and blast if
  271. upMain jump
  272.  
  273. stickUp:
  274.  10 y - movey' store
  275. upSweep jump
  276.  
  277. UpDirectionChange:
  278.  speedx chs speedx' store
  279.  180 aim' store
  280. rti
  281.  
  282. fastUpStopy:
  283.  0 speedy' store
  284.  10 y - movey' store
  285.  -1 top' setparam
  286. rti
  287.  
  288. ##############################################
  289. ################  leftovers  #################
  290. ##############################################
  291.  
  292. getUp:
  293.  20 y - movey' store
  294. return
  295.  
  296. getDown:
  297.  280 y - movey' store
  298. return
  299.  
  300. getRight:
  301.  280 x - movex' store
  302. return
  303.  
  304. getLeft:
  305.  20 x - movex' store
  306. return
  307.  
  308. ##############################################
  309. ###########  collision handling  #############
  310. ##############################################
  311.  
  312. kill:
  313.  speedy speedx arctan aim' store
  314.  range inRange if
  315.  aim 45 - aim' store
  316.  range inRange if
  317.  aim 45 - aim' store
  318.  range inRange if
  319.  aim 45 - aim' store
  320.  range inRange if
  321.  0 aim' store
  322.  range inRange if
  323.  135 aim' store
  324.  range inRange if
  325.  270 aim' store
  326.  range inRange if
  327.  45 aim' store
  328.  range inRange if
  329.  180 aim' store
  330.  range inRange if
  331.  315 aim' store
  332.  range inRange if
  333.  90 aim' store
  334.  range inRange if
  335.  225 aim' store
  336.  range inRange if
  337. rti
  338.  
  339. inRange:
  340.  range dup 38 < and wham ifg
  341. return
  342.  
  343. ##############################################
  344. #################  firing  ###################
  345. ##############################################
  346.  
  347. Shoot:
  348.  range dup 38 < and Wham ifg
  349.  aim doppler 9 * 2 / +
  350.  range dup 160 < and more ifg
  351.  range LongShot ifg
  352.  drop
  353. rti
  354.  
  355. Blast:
  356.  150 fire' store
  357.  sync
  358. return
  359.  
  360. Wham:
  361.  150 fire' store
  362. rti
  363.  
  364. more:
  365.  energy 85 < PartialShot ifg
  366.  aim' store
  367.  60 fire' store
  368. rti
  369.  
  370. PartialShot:
  371.  aim' store
  372.  energy 25 - fire' store
  373. rti
  374.  
  375. LongShot:
  376.  energy 55 < PartialShot ifg
  377.  aim' store
  378.  30 fire' store
  379. rti
  380.  
  381. RandomShot:
  382.  30 fire' store
  383. return